﻿using mozhi.smarterp.AuthorCenter.OpenIddict;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;

namespace mozhi.smarterp.AuthorCenter.Users.Repositories
{
    public interface IUserTenantRepository : IRepository<UserTenant ,Guid>
    {
        Task<int> GetCountAsync(Guid? userId, Guid? tenantId, CancellationToken cancellationToken = default);

        Task<List<UserTenant>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, Guid? userId=null, Guid? tenantId=null, CancellationToken cancellationToken = default);

        Task<UserTenant> FindAsync(Guid userId, Guid tenantId, Guid? targetUserId = null , CancellationToken cancellationToken = default);
    }
}
